//====================================================
//
//		table
//
//====================================================

//默认表格
.@{prefix}table {
	border-collapse: collapse;			//边框合并为一个单一的边框，忽略 border-spacing 和 empty-cells 属性
    color: @color-def-table;
	font-size: unit(@fontsize-table, em);
    background: @bgcolor-def-table;

	&>caption {
		padding: 8px 15px;
        color: @color-caption-table;
		text-align: left;
        font-weight: @fontweight-bold;
        background: @bgcolor-caption-table;
	}
	&>thead>tr,
	&>tbody>tr,
	&>tfoot>tr,
	&>tr {
		&>th,
		&>td {
			padding: 8px 15px;
		}
		&>th {
			padding: 8px 15px;
			text-align: left;
            border-bottom: 1px solid @bordercolor-def-table;
            color: @color-head-table;
			font-weight: @fontweight-bold;
		}
	}
    &>thead>tr {
        &>th,
        &>td {
            color: @color-head-table;
}
    }
    &>tbody>tr {
        &>th,
        &>td {
            color: @color-body-table;
        }
    }
    &>tfoot>tr {
        &>th,
        &>td {
            color: @color-foot-table;
        }
    }
}

.@{prefix}table-full {
	width: 100%;
}

.@{prefix}table-line {
	&>thead>tr,
	&>tbody>tr,
	&>tfoot>tr,
	&>tr {
		&>th {
            border-bottom: 1px solid @bordercolor-def-table;
		}
		&>td {
            border-top: 1px solid @bordercolor-def-table;
		}
	}
}
.@{prefix}table-grid {
	&>caption {
        border-bottom: 1px solid @bordercolor-head-table;
	}
	&>thead>tr,
	&>tbody>tr,
	&>tfoot>tr,
	&>tr {
		&>th,
		&>td {
            border: 1px solid @bordercolor-def-table;
			border-width: 1px 0 0 1px;
			// border-width: 0px 1px 1px 0px;
		}
	}

	&>thead,
	&>tbody:first-child {
		&>tr:first-child {
			&>th,
			&>td {
				border-top-width: 0;
			}
		}
	}
	&>thead,
	&>tfoot,
	&>tbody {
		&>tr {
			&>th:first-child,
			&>td:first-child {
				border-left-width: 0;
			}
		}
	}

}
.@{prefix}table-grid-border {
	display: inline-table;
    border: 3px solid @bordercolor-box-table;
    overflow: hidden;
	.prefix-border-radius(@radius-table);

	.@{prefix}table {
		width: 100%;
	}
}
.@{prefix}table-small {
	&>thead>tr,
	&>tbody>tr,
	&>tfoot>tr,
	&>tr {
		&>th,
		&>td {
			padding: 1px 5px;
		}
		&>th {
			padding: 3px 5px;
		}
	}
}
.@{prefix}table-diff {
  > tbody > tr:nth-of-type(even) {
    background-color: @bgcolor-diff-table;
  }
}
.@{prefix}table-hover {
  &>tbody>tr:hover {
        background-color: @bgcolor-hover-table;
        &>td {
            color: @color-hover-table;
        }
    }
}
